var express = require('express');
var router = express.Router();
let jwtUtils = require('../utils/jwtUtils');
const mail = require('../utils/mailUtil');

const userMid = require('../middleware/user_mid.js');

/**
 * 发送邮件
 */
router.post('/setEM', function (req, resp, next) {
  let { email, subject, text, html } = req.body;
  mail.emailTo(email, subject, text, html, function (v) {
    resp.send(v);
  });
});

module.exports = router;
